<?require_once("conn.php");?>

<table id="sendOfficeData" width="100%">
	<tr>
		<td width="100">Category : </td>
		<td>
			<select id="send_cat" onchange="updateSendItem()">
				<option value="">&nbsp;</option>
				<?
					$sql = "SELECT * FROM pch_category;";
					$query = mysql_query($sql);
					while($row = mysql_fetch_array($query)){
					?>
						<option value="<?=$row["id"]?>"><?=$row["category_name"]?></option>
					<?
					}
				?>
			</select>
		</td>
	</tr>
	<tr>
		<td>Item : </td>
		<td>
			<input type="hidden" id="send_index" value="1">
			<input type="hidden" id="send_name" value="">
			<input type="hidden" id="send_unittext">
			<span id="send_show_item"><select><option value="1">Please Selete Category</option></select></span>	
		</td>
	</tr>
	<tr>
		<td>Amount : </td>
		<td><input type="text" id="send_amount" style="width:100px;" onkeypress="return numbersonly(event)"></td>
	</tr>
	<tr>
		<td>Unit : </td>
		<td>
			<select id="send_unit">
					<option value="">&nbsp;</option>
					<?
						$sqlP = "SELECT * FROM pch_unit ORDER BY unit_name;";
						$queryP = mysql_query($sqlP);
						while($rowP = mysql_fetch_array($queryP)){
					?>
						<option value="<?=$rowP["id"]?>"><?=$rowP["unit_name"]?></option>
					<?
						}
					?>
				</select>
		</td>
	</tr>
	<tr>
		<td>Description : </td>
		<td><input type="text" id="send_desc"></td>
	</tr>
	<tr>
		<td><input type="button" value="Add" onclick="addrowSendOffice()" style="width:90px;"></td>
		<td><input type="button" id="btnCheckOut" onclick="sendCheckOut()" value="Send" style="width:90px;" disabled></td>
	</tr>
</table>

<table id="sendOffice_list" width="750" border="1" style="display:none;">
	<tr>
		<td colspan="5">รายการส่งของขึ้นฝั่งวันที่  <?=date("d/m/Y");?></td>
	</tr>
	<tr>
		<td width="600">Item</td>
		<td width="50" align="center">Amount</td>
		<td width="50" align="center">Unit</td>
		<td width="50" align="center">Desc</td>
		<td width="50">&nbsp;</td>
	</tr>
</table>
